package com.godyao.mall.coupon.api.feign.fallback;

import com.godyao.mall.common.to.SkuReductionTo;
import com.godyao.mall.common.to.SpuBoundTo;
import com.godyao.mall.core.model.ResultCode;
import com.godyao.mall.core.model.ResultMsg;
import com.godyao.mall.core.model.goods.Goods;
import com.godyao.mall.coupon.api.feign.CouponFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author godyao
 * @date 2022/4/3
 */
@Slf4j
@Component
public class CouponFeignFallback implements CouponFeign {
    @Override
    public ResultMsg saveSpuBounds(SpuBoundTo spuBoundTo) {
        log.error("Coupon Server Fallback..........");
        return ResultMsg.resultFail(ResultCode.SERVER_FALLBACK.getCode(),ResultCode.SERVER_FALLBACK.getMsg());

    }

    @Override
    public ResultMsg saveSkuReduction(SkuReductionTo skuReductionTo) {
        log.error("Coupon Server Fallback..........");
        return ResultMsg.resultFail(ResultCode.SERVER_FALLBACK.getCode(),ResultCode.SERVER_FALLBACK.getMsg());
    }
}
